package com.shop.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;


@Data
@TableName("orders")
@ApiModel("Orders对象")
public class Orders implements Serializable {
    @TableId(value = "orders_id",type = IdType.AUTO)
    @ApiModelProperty(value = "id",required = true,example = "0")
    private Integer id;//订单主键

    @TableField("code")

    private String code;//订单编号
    @ApiModelProperty("订单编号")
    @TableField("user_id")
    private Integer userId;//用户名称

    @TableField("create_time")
    @ApiModelProperty("创建时间")
    private LocalDateTime time;//创建时间

    @TableField("address_id")
    @ApiModelProperty("订单地址id")
    private Integer addressId;//订单地址

    @TableField("status")
    @ApiModelProperty("订单状态")
    private Integer status;//订单状态

    @TableField(exist = false)
    @ApiModelProperty("用户名称")
    private String userName;

    @TableField(exist = false)
    @ApiModelProperty("地址名称")
    private String addressName;
}
